package com.ssy.lingxi.order.api.model.openapi.request;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * OpenApi - 创建采购订单接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-10-16
 */
public class OpenApiOrderVO implements Serializable {
    private static final long serialVersionUID = 5657893857516729560L;

    /**
     * 订单来源商城Id
     */
    @NotNull(message = "订单来源商城Id不能为空")
    @Positive(message = "订单来源商城Id要大于0")
    private Long shopId;

    /**
     * 采购（买方）会员Id
     */
    @NotNull(message = "采购（买方）会员Id要大于0")
    @Positive(message = "采购（买方）会员Id要大于0")
    private Long buyerMemberId;

    /**
     * 采购（买方）会员角色Id
     */
    @NotNull(message = "采购（买方）会员角色Id要大于0")
    @Positive(message = "采购（买方）会员角色Id要大于0")
    private Long buyerRoleId;

    /**
     * 采购（买方）会员名称
     */
    @NotBlank(message = "采购（买方）会员名称不能为空")
    private String buyerMemberName;

    /**
     * 销售（卖方）会员Id
     */
    @NotNull(message = "销售（卖方）会员Id要大于0")
    @Positive(message = "销售（卖方）会员Id要大于0")
    private Long vendorMemberId;

    /**
     * 销售（卖方）会员角色Id
     */
    @NotNull(message = "销售（卖方）会员角色Id要大于0")
    @Positive(message = "销售（卖方）会员角色Id要大于0")
    private Long vendorRoleId;

    /**
     * 销售（卖方）会员名称
     */
    @NotBlank(message = "销售（卖方）会员名称不能为空")
    private String vendorMemberName;
    
    /**
     *  支付方式，0-无需支付，1-线上支付，2-线下支付，3-授信额度支付，4-货到付款
     */
    @NotNull(message = "支付方式要大于等于0")
    @PositiveOrZero(message = "支付渠道要大于等于0")
    private Integer payType;

    /**
     * 支付渠道，0-无需支付，1-支付宝，2-微信，3-银联，4-余额支付，5-线下支付线上确认，6-授信额度支付，7-货到付款
     */
    @NotNull(message = "支付渠道要大于等于0")
    @PositiveOrZero(message = "支付渠道要大于等于0")
    private Integer payChannel;

    /**
     * 运费
     */
    private BigDecimal freight;

    /**
     * 收货地址，如商品配送方式中包含“物流”，则必须填写
     */
    @Valid
    private OpenApiConsigneeVO consignee;

    /**
     * 发票信息，如订单没有发票不需要填写此字段
     */
    @Valid
    private OpenApiInvoiceVO invoice;

    /**
     * 合同信息，如订单没有合同不需要填写此字段
     */
    @Valid
    private OpenApiContractVO contract;

    /**
     * 商品列表
     */
    @NotEmpty(message = "商品列表不能为空")
    @Valid
    private List<OpenApiProductVO> products;

    /**
     * 订单其他要求。如订单没有其他要求不需要填写此字段
     */
    private OpenApiRequirementVO requirement;

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public Long getBuyerRoleId() {
        return buyerRoleId;
    }

    public void setBuyerRoleId(Long buyerRoleId) {
        this.buyerRoleId = buyerRoleId;
    }

    public String getBuyerMemberName() {
        return buyerMemberName;
    }

    public void setBuyerMemberName(String buyerMemberName) {
        this.buyerMemberName = buyerMemberName;
    }

    public Long getVendorMemberId() {
        return vendorMemberId;
    }

    public void setVendorMemberId(Long vendorMemberId) {
        this.vendorMemberId = vendorMemberId;
    }

    public Long getVendorRoleId() {
        return vendorRoleId;
    }

    public void setVendorRoleId(Long vendorRoleId) {
        this.vendorRoleId = vendorRoleId;
    }

    public String getVendorMemberName() {
        return vendorMemberName;
    }

    public void setVendorMemberName(String vendorMemberName) {
        this.vendorMemberName = vendorMemberName;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(Integer payChannel) {
        this.payChannel = payChannel;
    }

    public BigDecimal getFreight() {
        return freight;
    }

    public void setFreight(BigDecimal freight) {
        this.freight = freight;
    }

    public OpenApiConsigneeVO getConsignee() {
        return consignee;
    }

    public void setConsignee(OpenApiConsigneeVO consignee) {
        this.consignee = consignee;
    }

    public OpenApiInvoiceVO getInvoice() {
        return invoice;
    }

    public void setInvoice(OpenApiInvoiceVO invoice) {
        this.invoice = invoice;
    }

    public OpenApiContractVO getContract() {
        return contract;
    }

    public void setContract(OpenApiContractVO contract) {
        this.contract = contract;
    }

    public List<OpenApiProductVO> getProducts() {
        return products;
    }

    public void setProducts(List<OpenApiProductVO> products) {
        this.products = products;
    }

    public OpenApiRequirementVO getRequirement() {
        return requirement;
    }

    public void setRequirement(OpenApiRequirementVO requirement) {
        this.requirement = requirement;
    }
}
